
<%@ page import="rentadomus.Pqr" %>
<!DOCTYPE html>
<html>
  <head>
    <meta name="layout" content="main">
  <g:set var="entityName" value="${message(code: 'pqr.label', default: 'Pqr')}" />
  <title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
  <a href="#list-pqr" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
  <div class="nav" role="navigation">
    <ul>
      <li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
    </ul>
  </div>
  
  <div id="list-pqr" class="content scaffold-list" role="main">
    <h1>PQR's of my places</h1>
    <table>
      <thead>
        <tr>
          <th><g:message code="pqr.place.label" default="Place" /></th>
          <g:sortableColumn property="title" title="${message(code: 'pqr.title.label', default: 'Title')}" />
          <g:sortableColumn property="status" title="${message(code: 'pqr.status.label', default: 'Status')}" />
          <g:sortableColumn property="dateRequested" title="${message(code: 'pqr.dateRequested.label', default: 'Date Requested')}" />
          <g:sortableColumn property="dateResolved" title="${message(code: 'pqr.dateResolved.label', default: 'Date Resolved')}" />
          <!--<g:sortableColumn property="description" title="${message(code: 'pqr.description.label', default: 'Description')}" />-->            
      </tr>
      </thead>
      <tbody>
      <g:each in="${otherPqr}" status="i" var="pqrInstance">
        <tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
          <td>${fieldValue(bean: pqrInstance, field: "place")}</td>
          <td><g:link action="show" id="${pqrInstance.id}">${fieldValue(bean: pqrInstance, field: "title")}</g:link></td>
          <td>${fieldValue(bean: pqrInstance, field: "status")}</td>
          <td><g:formatDate date="${pqrInstance.dateRequested}" /></td>
          <td>
          <g:if test="${pqrInstance.dateResolved}">
            <g:formatDate date="${pqrInstance.dateResolved}" /></td>
          </g:if>
          <g:else>
            --
          </g:else>
          <!--<td>${fieldValue(bean: pqrInstance, field: "description")}</td>-->
        </tr>
      </g:each>
      </tbody>
    </table>
    <div class="pagination">
      <g:paginate total="${otherPqrTotal}" />
    </div>
  </div>

  
  <div id="list-pqr" class="content scaffold-list" role="main">
    <h1>My PQR's</h1>
    <div class="nav" role="navigation">
    <ul>
      <li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
    </ul>
  </div>
    <g:if test="${flash.message}">
      <div class="message" role="status">${flash.message}</div>
    </g:if>
    <table>
      <thead>
        <tr>
          <th><g:message code="pqr.place.label" default="Place" /></th>
          <g:sortableColumn property="title" title="${message(code: 'pqr.title.label', default: 'Title')}" />
          <g:sortableColumn property="status" title="${message(code: 'pqr.status.label', default: 'Status')}" />
          <g:sortableColumn property="dateRequested" title="${message(code: 'pqr.dateRequested.label', default: 'Date Requested')}" />
          <g:sortableColumn property="dateResolved" title="${message(code: 'pqr.dateResolved.label', default: 'Date Resolved')}" />
          <!--<g:sortableColumn property="description" title="${message(code: 'pqr.description.label', default: 'Description')}" />-->
      </tr>
      </thead>
      <tbody>
      <g:each in="${pqrInstanceList}" status="i" var="pqrInstance">
        <tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
          <td>${fieldValue(bean: pqrInstance, field: "place")}</td>
          <td><g:link action="show" id="${pqrInstance.id}">${fieldValue(bean: pqrInstance, field: "title")}</g:link></td>
          <td>${fieldValue(bean: pqrInstance, field: "status")}</td>
          <td><g:formatDate date="${pqrInstance.dateRequested}" /></td>
          <td>
          <g:if test="${pqrInstance.dateResolved}">
            <g:formatDate date="${pqrInstance.dateResolved}" /></td>
          </g:if>
          <g:else>
            --
          </g:else>
          <!--<td>${fieldValue(bean: pqrInstance, field: "description")}</td>-->
        </tr>
      </g:each>
      </tbody>
    </table>
    <div class="pagination">
      <g:paginate total="${pqrInstanceTotal}" />
    </div>
  </div>
</body>
</html>
